Distributed database systems may include many data nodes working together to perform transactions. Different data nodes are coordinated to perform a transaction, with different nodes working on different transactions or different aspects of a transaction. Some database transactions are performed on multiple data nodes, which may lead to consistency anomalies. For example, a task may be committed by one data node but not on other data nodes at a particular time, during which another concurrent transaction may access those same data nodes and only see partially committed data. When a concurrent transaction is performed on multiple data nodes, it is desirable for the transaction to have a consistent view of the data on all data nodes of a transaction.
When a transaction involving multiple servers is committed, a two-phase commit may be conducted to ensure that the processing of the transaction on all the servers is completed. A global transaction manager (GTM) supports atomicity, consistency, isolation, and durability (ACID) compliant transactions in distributed databases. The GTM provides a global transaction identification number (ID) to uniquely identify a transaction in the system. Database systems such as Gauss massively parallel processing database (MPPDB), Postgres-XC, and Postgres-XL use a centralized GTM to prevent consistency anomalies.